#!/usr/bin/env node

const fs = require('fs'),
      stdout = process.stdout,
      file = process.argv[2] || __filename;

if(!fs.existsSync(file)){
  console.error(`${file} is not exist!`);
  process.exit(1);
}
if(!fs.statSync(file).isFile()){
  console.error(`${file} is error`);
  process.exit(2);
}
fs.createReadStream(file,'utf8').pipe(stdout);
